﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using LAB.Manager;

namespace VideoTag.Test
{
    public class testBag
    {

        public void test()
        {
            insert();
            delete();
            edit();
            search();
        }

        void insert()
        {
            var bagData = testData.getBags();
            var userData = testData.getUsers();
            foreach (var di in bagData)
            {
                BagManager.insert(di, userData[0]);
            }

        }

        void delete()
        {
            BagManager.delete(10,"newton@videotag");
            BagManager.delete(2,"jack");
        }

        void edit()
        {
            BagManager.edit(2, 1, "newton@videotag");
            BagManager.edit(4, 0, "jack");
            BagManager.edit(2, 0, "newton@videotag");
        }

        void search()
        {
            var rst = BagManager.search("英雄",0, 1, 3);
            var rst2 = BagManager.search(null, 1,1, 2);
        }
    }
}